Skip to content

docs(adr): ADR-0050 — split FormView.type into layout vs presentation (#1890)#1914

Merged
os-zhuang merged 1 commit into
mainfrom
docs/adr-form-layout-presentation
Jun 15, 2026
Merged

docs(adr): ADR-0050 — split FormView.type into layout vs presentation (#1890)#1914
os-zhuang merged 1 commit into
mainfrom
docs/adr-form-layout-presentation

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

Proposes ADR-0050 — the modelling fix behind the form-variant work in #1890 / objectstack-ai/objectui#1762.

FormView.type overloads two orthogonal dimensions in one enum:

  • layout: simple / tabbed / wizard / split
  • presentation container: drawer / modal

So "a modal containing a tabbed form" is inexpressible — type is one value. That's exactly why the real modal create/edit entry points (AppContent, useActionModal) hard-set formType:'modal' and the form inside can only be simple.

Key findings (in the ADR)

  • ObjectForm already implements every variant — the gap was entry wiring (full-page route fixed in objectui#1762).
  • Presentation is already modelled independently: NavigationMode (detail open), list addRecord.mode, action type:'modal'.
  • drawer/modal/split as FormView.type values have zero real usage — only 5 showcase/template demo named views.

Decision

FormView.typelayout only (simple/tabbed/wizard). Drop drawer/modal (caller-supplied containers via the existing open-mode fields) and split (covered by subforms + the list's split-detail mode). ObjectForm drops the retired branches.

Sequencing

This PR is the design (ADR doc only). Implementation is a spec-major change (breaking enum narrowing, like ADR-0021's cutover) — it should land after architect sign-off, ideally bundled with modal/drawer layout-forwarding so the "modal + tabbed" capability ships demonstrably. Migration cost is low (near-zero real usage).

Refs #1890

🤖 Generated with Claude Code

…resentation

FormView.type conflates layout (simple/tabbed/wizard/split) with presentation
container (drawer/modal), so "a modal containing a tabbed form" is inexpressible
— which is why modal create/edit can only render simple. Presentation is already
modelled elsewhere (NavigationMode, addRecord.mode, action type:'modal') and the
drawer/modal/split form-type values have zero real usage (5 demo named views).

Decision: FormView.type = layout only (simple/tabbed/wizard); drop drawer/modal
(caller-supplied containers) and split (covered by subforms + list split-detail);
ObjectForm drops the retired branches. Spec-major; implement after sign-off,
bundled with modal/drawer layout-forwarding so "modal + tabbed" ships.

Refs #1890
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 15, 2026 2:25pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation size/s and removed documentation Improvements or additions to documentation labels Jun 15, 2026
@os-zhuang
os-zhuang merged commit bd8dc4e into main Jun 15, 2026
13 checks passed
@os-zhuang
os-zhuang deleted the docs/adr-form-layout-presentation branch June 15, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant